Effective Analysis of C Programs by Rewriting Variability

نویسندگان

  • Alexandru Florin Iosif-Lazar
  • Jean Melo
  • Aleksandar Dimovski
  • Claus Brabrand
  • Andrzej Wasowski
چکیده

Context. Variability-intensive programs (program families) appear in many application areas and for many reasons today. Different family members, called variants, are derived by switching statically configurable options (features) on and off, while reuse of the common code is maximized. Inquiry. Verification of program families is challenging since the number of variants is exponential in the number of features. Existing single-program analysis and verification tools cannot be applied directly to program families, and designing and implementing the corresponding variability-aware versions is tedious and laborious. Approach. In this work, we propose a range of variability-related transformations for translating program families into single programs by replacing compile-time variability with run-time variability (non-determinism). The obtained transformed programs can be subsequently analyzed using the conventional off-the-shelf singleprogram analysis tools such as type checkers, symbolic executors, model checkers, and static analyzers. Knowledge. Our variability-related transformations are outcome-preserving, which means that the relation between the outcomes in the transformed single program and the union of outcomes of all variants derived from the original program family is equality. Grounding. We present our transformation rules and their correctness with respect to a minimal core imperative language IMP. Then, we discuss our experience of implementing and using the transformations for efficient and effective analysis and verification of real-world C program families. Importance. We report some interesting variability-related bugs that we discovered using various state-of-theart single-program C verification tools, such as Frama-C, Clang, LLBMC. ACM CCS 2012 Software and its engineering → Software creation and management Software verification and validation; Software notations and tools Formal language definitions;

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Rewriting Logic Techniques for Program Analysis and Optimization

Debugging is the process of locating and fixing errors in computer programs. Debugging is essential in software development and almost every programming language has its own specialized tools for the task, with high variability regarding their debugging power. This paper briefly describes ongoing research towards a Ph.D. thesis on universal debugging, a proposal to develop a program debugging f...

متن کامل

Automatic Parallelization of Restricted C Programs using Pointer Analysis

This paper describes a restriction on pointer usage in C language for parallelism extraction by an automatic parallelizing compiler. By rewriting programs to satisfy the restriction, automatic parallelization using flow-sensitive, context-sensitive pointer analysis on an 8 cores SMP server achieved 3.80 times speedup for SPEC2000 art, 6.17 times speedup for SPEC2006 lbm and 5.14 times speedup f...

متن کامل

Molecular and morphological assessment of genetic variability induced by gamma radiation in canola

Mutation induction is considered as an effective way to enrich plant genetic variation, particularly for traits with a very low level of genetic variation. This research was conducted to assess genetic variation induced by gamma radiation in M2 and M3 mutant lines of canola (Brassica napus L.) by SSR and morphological characteristics and to identify useful mutants in terms of agronomic traits. ...

متن کامل

Automatic Constrained Rewriting Induction towards Verifying Procedural Programs

This paper aims at developing a verification method for procedural programs via a transformation into logically constrained term rewriting systems (LCTRSs). To this end, we adapt existing rewriting induction methods to LCTRSs and propose a simple yet effective method to generalize equations. We show that we can handle realistic functions, involving, e.g., integers and arrays. An implementation ...

متن کامل

Automated Termination Analysis: From Term Rewriting to Programming Languages

Termination is a crucial property of programs. Therefore, techniques to analyze termination automatically are highly important for program verification. Traditionally, techniques for automated termination analysis were mainly studied for declarative programming paradigms such as logic programming and term rewriting. However, in the last years, several powerful techniques and tools have been dev...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Programming Journal

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2017